/** 系统样式相关
 * 1. 窗口信息：设配类型、窗口宽高
 * 2. 主题
 * */
const themes = {
  state (){
    return {
      // 窗口信息
      windowInfo: null,
      // css主题
      themes: null,
    }
  },
  mutations: {
    windowInfo(state, {clientWidth, clientHeight, winType}) {
      state.winType = winType;
      state.clientWidth = clientWidth;
      state.clientHeight = clientHeight;
    },
    themes: (state, data) => {
      state.themes = data;
    },
  },
  getters: {
    // 设配类型
    winType(state) {
      return state.winType;
    },
    // 窗口宽
    clientWidth(state) {
      return state.clientWidth;
    },
    // 窗口高
    clientHeight(state) {
      return state.clientHeight;
    },
    // 主题
    themes: (state) => {
      return state.themes;
    }
  }
};
export default themes;